<template>
  <div>
    <el-dialog
      title="缴费申请"
      :visible.sync="dialogVisible"
      width="60%"
    >
      <avue-form ref="form" v-model="obj" :option="option" @submit="submit">
      </avue-form>

    </el-dialog>

  </div>
</template>

<script>
export default {
  name: "paymentSQ",
  data() {
    return {
      dialogVisible: false,
      obj: {},
      option: {
        column: [{
          label: "学费",
          prop: "tuition",
          rules: [{
            required: true,
            message: "请输入学费",
            trigger: "blur"
          }],
        },
          {
            label: "付款方式",
            prop: "PAY_TYPE",
            type: "select",
            dicUrl: '/yuanjiu.testnew/yj-config/getConfigByCode?itmCode=PAY_TYPE',
            props: {
              label: "itmName",
              value: "itmVal",
              res: "result"
            },
            rules: [{
              required: true,
              message: "请选择付款方式",
              trigger: "change"
            }]
          },
          {
            label: "付款周期",
            prop: "payPeriodCode",
            type: "select",
            dicUrl: '/yuanjiu.testnew/yj-config/getConfigByCode?itmCode=PAY_PERIOD',
            props: {
              label: "itmName",
              value: "itmVal",
              res: "result"
            },
            rules: [{
              required: true,
              message: "请选择付款周期",
              trigger: "change"
            }]
          },
          {
            label: "贷款机构",
            prop: "loanOrg",

            type: "select",
            dicUrl: '/yuanjiu.testnew/yj-config/getConfigByCode?itmCode=LOAN_ORG',
            props: {
              label: "itmName",
              value: "itmVal",
              res: "result"
            },
            rules: [{
              required: true,
              message: "请选择贷款机构",
              trigger: "change"
            }]
          },
          {
            label: "优惠金额",
            prop: "discountAmt",
            rules: [{
              required: true,
              message: "请输入优惠金额",
              trigger: "blur"
            }],
          },
          {
            label: "补贴金额",
            prop: "subsidyAmt",
            rules: [{
              required: true,
              message: "请输入补贴金额",
              trigger: "blur"
            }],
          },
          {
            label: "备注",
            prop: "remark",
            type:"textarea",
            span:24,

          }

        ]
      }
    }
  },
  methods: {
    openDialog(stuId) {
      // console.log('stuId',stuId)
      this.obj.stuId = stuId
      this.dialogVisible = true
    },
    submit(form,done) {
      done()
      // console.log('this',this.$parent)
      this.$httpService.post(' /yuanjiu.testnew/tn-fee-pay-inf/feePaymentApply',this.obj).then(res => {
        done()
        this.dialogVisible = false
        this.$parent.getList()

      })
    }
  }
}
</script>

<style scoped>

</style>
